# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=kdevelop
pkgver=23.04.1
_clangver=15.0.7
pkgrel=1
pkgdesc='C++ IDE using KDE technologies'
arch=(x86_64)
url='http://www.kdevelop.org/'
license=(GPL)
depends=(clang=$_clangver libksysguard kitemmodels knotifyconfig ktexteditor grantlee libkomparediff2 kcmutils threadweaver)
makedepends=(extra-cmake-modules kdoctools kdevelop-pg-qt llvm qt5-tools plasma-framework krunner okteta boost purpose subversion astyle)
optdepends=('konsole: embedded terminal'
            'git: Git support' 'subversion: SVN support'
            'gdb: GNU debugger support' 'lldb: LLDB debugger support'
            'qt5-doc: Qt documentation integration'
            'cmake: cmake integration'
            'kate: for additional plugins'
            'meson: meson integration'
            'qt5-tools: qthelp plugin'
            'okteta: GNU debugger support'
            'plasma-framework: for the plasma addons'
            'purpose: patch review plugin'
            'astyle: astyle plugin'
            'cppcheck: code analyzer' 'heaptrack: memory profiler'
            'clazy: clazy analyzer plugin'
            'kio-extras: man pages plugin')
conflicts=(kdevelop-qmljs kdevplatform)
replaces=(kdevelop-qmljs kdevplatform kdevelop-clang-tidy)
groups=(kde-applications kdevelop)
source=(https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('63d3d9b0264fda443ddc93b5b1fbfa68d05c84df8cfabf90a601feefd3653297'
            'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87  # Christoph Feck <cfeck@kde.org>
              D81C0CB38EB725EF6691C385BB463350D6EF31EF) # Heiko Becker <heiko.becker@kde.org>

build() {
  cmake -B build -S $pkgname-$pkgver \
    -DBUILD_TESTING=OFF
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
